3.290 \(\int (f+g x^3) \log (c (d+e x^2)^p) \, dx\)

Optimal. Leaf size=110 \[ f x \log \left (c \left (d+e x^2\right )^p\right )+\frac{1}{4} g x^4 \log \left (c \left (d+e x^2\right )^p\right )-\frac{d^2 g p \log \left (d+e x^2\right )}{4 e^2}+\frac{2 \sqrt{d} f p \tan ^{-1}\left (\frac{\sqrt{e} x}{\sqrt{d}}\right )}{\sqrt{e}}+\frac{d g p x^2}{4 e}-2 f p x-\frac{1}{8} g p x^4 \]

[Out]

-2*f*p*x + (d*g*p*x^2)/(4*e) - (g*p*x^4)/8 + (2*Sqrt[d]*f*p*ArcTan[(Sqrt[e]*x)/Sqrt[d]])/Sqrt[e] - (d^2*g*p*Lo
g[d + e*x^2])/(4*e^2) + f*x*Log[c*(d + e*x^2)^p] + (g*x^4*Log[c*(d + e*x^2)^p])/4

________________________________________________________________________________________

Rubi [A]  time = 0.0974112, antiderivative size = 110, normalized size of antiderivative = 1., number of steps used = 9, number of rules used = 7, integrand size = 20, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.35, Rules used = {2471, 2448, 321, 205, 2454, 2395, 43} \[ f x \log \left (c \left (d+e x^2\right )^p\right )+\frac{1}{4} g x^4 \log \left (c \left (d+e x^2\right )^p\right )-\frac{d^2 g p \log \left (d+e x^2\right )}{4 e^2}+\frac{2 \sqrt{d} f p \tan ^{-1}\left (\frac{\sqrt{e} x}{\sqrt{d}}\right )}{\sqrt{e}}+\frac{d g p x^2}{4 e}-2 f p x-\frac{1}{8} g p x^4 \]

Antiderivative was successfully verified.

[In]

Int[(f + g*x^3)*Log[c*(d + e*x^2)^p],x]

[Out]

-2*f*p*x + (d*g*p*x^2)/(4*e) - (g*p*x^4)/8 + (2*Sqrt[d]*f*p*ArcTan[(Sqrt[e]*x)/Sqrt[d]])/Sqrt[e] - (d^2*g*p*Lo
g[d + e*x^2])/(4*e^2) + f*x*Log[c*(d + e*x^2)^p] + (g*x^4*Log[c*(d + e*x^2)^p])/4

Rule 2471

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_)^(n_))^(p_.)]*(b_.))^(q_.)*((f_) + (g_.)*(x_)^(s_))^(r_.), x_Symbol]
:> With[{t = ExpandIntegrand[(a + b*Log[c*(d + e*x^n)^p])^q, (f + g*x^s)^r, x]}, Int[t, x] /; SumQ[t]] /; Free
Q[{a, b, c, d, e, f, g, n, p, q, r, s}, x] && IntegerQ[n] && IGtQ[q, 0] && IntegerQ[r] && IntegerQ[s] && (EqQ[
q, 1] || (GtQ[r, 0] && GtQ[s, 1]) || (LtQ[s, 0] && LtQ[r, 0]))

Rule 2448

Int[Log[(c_.)*((d_) + (e_.)*(x_)^(n_))^(p_.)], x_Symbol] :> Simp[x*Log[c*(d + e*x^n)^p], x] - Dist[e*n*p, Int[
x^n/(d + e*x^n), x], x] /; FreeQ[{c, d, e, n, p}, x]

Rule 321

Int[((c_.)*(x_))^(m_)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[(c^(n - 1)*(c*x)^(m - n + 1)*(a + b*x^n
)^(p + 1))/(b*(m + n*p + 1)), x] - Dist[(a*c^n*(m - n + 1))/(b*(m + n*p + 1)), Int[(c*x)^(m - n)*(a + b*x^n)^p
, x], x] /; FreeQ[{a, b, c, p}, x] && IGtQ[n, 0] && GtQ[m, n - 1] && NeQ[m + n*p + 1, 0] && IntBinomialQ[a, b,
 c, n, m, p, x]

Rule 205

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]*ArcTan[x/Rt[a/b, 2]])/a, x] /; FreeQ[{a, b}, x]
&& PosQ[a/b]

Rule 2454

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_)^(n_))^(p_.)]*(b_.))^(q_.)*(x_)^(m_.), x_Symbol] :> Dist[1/n, Subst[I
nt[x^(Simplify[(m + 1)/n] - 1)*(a + b*Log[c*(d + e*x)^p])^q, x], x, x^n], x] /; FreeQ[{a, b, c, d, e, m, n, p,
 q}, x] && IntegerQ[Simplify[(m + 1)/n]] && (GtQ[(m + 1)/n, 0] || IGtQ[q, 0]) &&  !(EqQ[q, 1] && ILtQ[n, 0] &&
 IGtQ[m, 0])

Rule 2395

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))*((f_.) + (g_.)*(x_))^(q_.), x_Symbol] :> Simp[((f + g
*x)^(q + 1)*(a + b*Log[c*(d + e*x)^n]))/(g*(q + 1)), x] - Dist[(b*e*n)/(g*(q + 1)), Int[(f + g*x)^(q + 1)/(d +
 e*x), x], x] /; FreeQ[{a, b, c, d, e, f, g, n, q}, x] && NeQ[e*f - d*g, 0] && NeQ[q, -1]

Rule 43

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rubi steps

\begin{align*} \int \left (f+g x^3\right ) \log \left (c \left (d+e x^2\right )^p\right ) \, dx &=\int \left (f \log \left (c \left (d+e x^2\right )^p\right )+g x^3 \log \left (c \left (d+e x^2\right )^p\right )\right ) \, dx\\ &=f \int \log \left (c \left (d+e x^2\right )^p\right ) \, dx+g \int x^3 \log \left (c \left (d+e x^2\right )^p\right ) \, dx\\ &=f x \log \left (c \left (d+e x^2\right )^p\right )+\frac{1}{2} g \operatorname{Subst}\left (\int x \log \left (c (d+e x)^p\right ) \, dx,x,x^2\right )-(2 e f p) \int \frac{x^2}{d+e x^2} \, dx\\ &=-2 f p x+f x \log \left (c \left (d+e x^2\right )^p\right )+\frac{1}{4} g x^4 \log \left (c \left (d+e x^2\right )^p\right )+(2 d f p) \int \frac{1}{d+e x^2} \, dx-\frac{1}{4} (e g p) \operatorname{Subst}\left (\int \frac{x^2}{d+e x} \, dx,x,x^2\right )\\ &=-2 f p x+\frac{2 \sqrt{d} f p \tan ^{-1}\left (\frac{\sqrt{e} x}{\sqrt{d}}\right )}{\sqrt{e}}+f x \log \left (c \left (d+e x^2\right )^p\right )+\frac{1}{4} g x^4 \log \left (c \left (d+e x^2\right )^p\right )-\frac{1}{4} (e g p) \operatorname{Subst}\left (\int \left (-\frac{d}{e^2}+\frac{x}{e}+\frac{d^2}{e^2 (d+e x)}\right ) \, dx,x,x^2\right )\\ &=-2 f p x+\frac{d g p x^2}{4 e}-\frac{1}{8} g p x^4+\frac{2 \sqrt{d} f p \tan ^{-1}\left (\frac{\sqrt{e} x}{\sqrt{d}}\right )}{\sqrt{e}}-\frac{d^2 g p \log \left (d+e x^2\right )}{4 e^2}+f x \log \left (c \left (d+e x^2\right )^p\right )+\frac{1}{4} g x^4 \log \left (c \left (d+e x^2\right )^p\right )\\ \end{align*}

Mathematica [A]  time = 0.0492158, size = 110, normalized size = 1. \[ f x \log \left (c \left (d+e x^2\right )^p\right )+\frac{1}{4} g x^4 \log \left (c \left (d+e x^2\right )^p\right )-\frac{d^2 g p \log \left (d+e x^2\right )}{4 e^2}+\frac{2 \sqrt{d} f p \tan ^{-1}\left (\frac{\sqrt{e} x}{\sqrt{d}}\right )}{\sqrt{e}}+\frac{d g p x^2}{4 e}-2 f p x-\frac{1}{8} g p x^4 \]

Antiderivative was successfully verified.

[In]

Integrate[(f + g*x^3)*Log[c*(d + e*x^2)^p],x]

[Out]

-2*f*p*x + (d*g*p*x^2)/(4*e) - (g*p*x^4)/8 + (2*Sqrt[d]*f*p*ArcTan[(Sqrt[e]*x)/Sqrt[d]])/Sqrt[e] - (d^2*g*p*Lo
g[d + e*x^2])/(4*e^2) + f*x*Log[c*(d + e*x^2)^p] + (g*x^4*Log[c*(d + e*x^2)^p])/4

________________________________________________________________________________________

Maple [C]  time = 0.565, size = 402, normalized size = 3.7 \begin{align*} \left ({\frac{g{x}^{4}}{4}}+fx \right ) \ln \left ( \left ( e{x}^{2}+d \right ) ^{p} \right ) -{\frac{i}{2}}\pi \,f{\it csgn} \left ( i \left ( e{x}^{2}+d \right ) ^{p} \right ){\it csgn} \left ( ic \left ( e{x}^{2}+d \right ) ^{p} \right ){\it csgn} \left ( ic \right ) x-{\frac{i}{8}}\pi \,g{x}^{4}{\it csgn} \left ( i \left ( e{x}^{2}+d \right ) ^{p} \right ){\it csgn} \left ( ic \left ( e{x}^{2}+d \right ) ^{p} \right ){\it csgn} \left ( ic \right ) +{\frac{i}{8}}\pi \,g{x}^{4} \left ({\it csgn} \left ( ic \left ( e{x}^{2}+d \right ) ^{p} \right ) \right ) ^{2}{\it csgn} \left ( ic \right ) +{\frac{i}{2}}\pi \,f \left ({\it csgn} \left ( ic \left ( e{x}^{2}+d \right ) ^{p} \right ) \right ) ^{2}{\it csgn} \left ( ic \right ) x-{\frac{i}{2}}\pi \,f \left ({\it csgn} \left ( ic \left ( e{x}^{2}+d \right ) ^{p} \right ) \right ) ^{3}x-{\frac{i}{8}}\pi \,g{x}^{4} \left ({\it csgn} \left ( ic \left ( e{x}^{2}+d \right ) ^{p} \right ) \right ) ^{3}+{\frac{i}{2}}\pi \,f{\it csgn} \left ( i \left ( e{x}^{2}+d \right ) ^{p} \right ) \left ({\it csgn} \left ( ic \left ( e{x}^{2}+d \right ) ^{p} \right ) \right ) ^{2}x+{\frac{i}{8}}\pi \,g{x}^{4}{\it csgn} \left ( i \left ( e{x}^{2}+d \right ) ^{p} \right ) \left ({\it csgn} \left ( ic \left ( e{x}^{2}+d \right ) ^{p} \right ) \right ) ^{2}+{\frac{\ln \left ( c \right ) g{x}^{4}}{4}}-{\frac{gp{x}^{4}}{8}}+{\frac{dgp{x}^{2}}{4\,e}}+\ln \left ( c \right ) fx+{\frac{fp}{e}\ln \left ( -\sqrt{-de}x+d \right ) \sqrt{-de}}-{\frac{{d}^{2}gp}{4\,{e}^{2}}\ln \left ( -\sqrt{-de}x+d \right ) }-{\frac{fp}{e}\ln \left ( \sqrt{-de}x+d \right ) \sqrt{-de}}-{\frac{{d}^{2}gp}{4\,{e}^{2}}\ln \left ( \sqrt{-de}x+d \right ) }-2\,fpx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((g*x^3+f)*ln(c*(e*x^2+d)^p),x)

[Out]

(1/4*g*x^4+f*x)*ln((e*x^2+d)^p)-1/2*I*Pi*f*csgn(I*(e*x^2+d)^p)*csgn(I*c*(e*x^2+d)^p)*csgn(I*c)*x-1/8*I*Pi*g*x^
4*csgn(I*(e*x^2+d)^p)*csgn(I*c*(e*x^2+d)^p)*csgn(I*c)+1/8*I*Pi*g*x^4*csgn(I*c*(e*x^2+d)^p)^2*csgn(I*c)+1/2*I*P
i*f*csgn(I*c*(e*x^2+d)^p)^2*csgn(I*c)*x-1/2*I*Pi*f*csgn(I*c*(e*x^2+d)^p)^3*x-1/8*I*Pi*g*x^4*csgn(I*c*(e*x^2+d)
^p)^3+1/2*I*Pi*f*csgn(I*(e*x^2+d)^p)*csgn(I*c*(e*x^2+d)^p)^2*x+1/8*I*Pi*g*x^4*csgn(I*(e*x^2+d)^p)*csgn(I*c*(e*
x^2+d)^p)^2+1/4*ln(c)*g*x^4-1/8*g*p*x^4+1/4*d*g*p*x^2/e+ln(c)*f*x+1/e*p*ln(-(-d*e)^(1/2)*x+d)*f*(-d*e)^(1/2)-1
/4/e^2*p*ln(-(-d*e)^(1/2)*x+d)*d^2*g-1/e*p*ln((-d*e)^(1/2)*x+d)*f*(-d*e)^(1/2)-1/4/e^2*p*ln((-d*e)^(1/2)*x+d)*
d^2*g-2*f*p*x

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((g*x^3+f)*log(c*(e*x^2+d)^p),x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [A]  time = 2.06046, size = 562, normalized size = 5.11 \begin{align*} \left [-\frac{e^{2} g p x^{4} - 2 \, d e g p x^{2} - 8 \, e^{2} f p \sqrt{-\frac{d}{e}} \log \left (\frac{e x^{2} + 2 \, e x \sqrt{-\frac{d}{e}} - d}{e x^{2} + d}\right ) + 16 \, e^{2} f p x - 2 \,{\left (e^{2} g p x^{4} + 4 \, e^{2} f p x - d^{2} g p\right )} \log \left (e x^{2} + d\right ) - 2 \,{\left (e^{2} g x^{4} + 4 \, e^{2} f x\right )} \log \left (c\right )}{8 \, e^{2}}, -\frac{e^{2} g p x^{4} - 2 \, d e g p x^{2} - 16 \, e^{2} f p \sqrt{\frac{d}{e}} \arctan \left (\frac{e x \sqrt{\frac{d}{e}}}{d}\right ) + 16 \, e^{2} f p x - 2 \,{\left (e^{2} g p x^{4} + 4 \, e^{2} f p x - d^{2} g p\right )} \log \left (e x^{2} + d\right ) - 2 \,{\left (e^{2} g x^{4} + 4 \, e^{2} f x\right )} \log \left (c\right )}{8 \, e^{2}}\right ] \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((g*x^3+f)*log(c*(e*x^2+d)^p),x, algorithm="fricas")

[Out]

[-1/8*(e^2*g*p*x^4 - 2*d*e*g*p*x^2 - 8*e^2*f*p*sqrt(-d/e)*log((e*x^2 + 2*e*x*sqrt(-d/e) - d)/(e*x^2 + d)) + 16
*e^2*f*p*x - 2*(e^2*g*p*x^4 + 4*e^2*f*p*x - d^2*g*p)*log(e*x^2 + d) - 2*(e^2*g*x^4 + 4*e^2*f*x)*log(c))/e^2, -
1/8*(e^2*g*p*x^4 - 2*d*e*g*p*x^2 - 16*e^2*f*p*sqrt(d/e)*arctan(e*x*sqrt(d/e)/d) + 16*e^2*f*p*x - 2*(e^2*g*p*x^
4 + 4*e^2*f*p*x - d^2*g*p)*log(e*x^2 + d) - 2*(e^2*g*x^4 + 4*e^2*f*x)*log(c))/e^2]

________________________________________________________________________________________

Sympy [A]  time = 72.9811, size = 175, normalized size = 1.59 \begin{align*} \begin{cases} \frac{i \sqrt{d} f p \log{\left (d + e x^{2} \right )}}{e \sqrt{\frac{1}{e}}} - \frac{2 i \sqrt{d} f p \log{\left (- i \sqrt{d} \sqrt{\frac{1}{e}} + x \right )}}{e \sqrt{\frac{1}{e}}} - \frac{d^{2} g p \log{\left (d + e x^{2} \right )}}{4 e^{2}} + \frac{d g p x^{2}}{4 e} + f p x \log{\left (d + e x^{2} \right )} - 2 f p x + f x \log{\left (c \right )} + \frac{g p x^{4} \log{\left (d + e x^{2} \right )}}{4} - \frac{g p x^{4}}{8} + \frac{g x^{4} \log{\left (c \right )}}{4} & \text{for}\: e \neq 0 \\\left (f x + \frac{g x^{4}}{4}\right ) \log{\left (c d^{p} \right )} & \text{otherwise} \end{cases} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((g*x**3+f)*ln(c*(e*x**2+d)**p),x)

[Out]

Piecewise((I*sqrt(d)*f*p*log(d + e*x**2)/(e*sqrt(1/e)) - 2*I*sqrt(d)*f*p*log(-I*sqrt(d)*sqrt(1/e) + x)/(e*sqrt
(1/e)) - d**2*g*p*log(d + e*x**2)/(4*e**2) + d*g*p*x**2/(4*e) + f*p*x*log(d + e*x**2) - 2*f*p*x + f*x*log(c) +
 g*p*x**4*log(d + e*x**2)/4 - g*p*x**4/8 + g*x**4*log(c)/4, Ne(e, 0)), ((f*x + g*x**4/4)*log(c*d**p), True))

________________________________________________________________________________________

Giac [A]  time = 1.32964, size = 158, normalized size = 1.44 \begin{align*} -\frac{1}{4} \, d^{2} g p e^{\left (-2\right )} \log \left (x^{2} e + d\right ) + 2 \, \sqrt{d} f p \arctan \left (\frac{x e^{\frac{1}{2}}}{\sqrt{d}}\right ) e^{\left (-\frac{1}{2}\right )} + \frac{1}{8} \,{\left (2 \, g p x^{4} e \log \left (x^{2} e + d\right ) - g p x^{4} e + 2 \, g x^{4} e \log \left (c\right ) + 2 \, d g p x^{2} + 8 \, f p x e \log \left (x^{2} e + d\right ) - 16 \, f p x e + 8 \, f x e \log \left (c\right )\right )} e^{\left (-1\right )} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((g*x^3+f)*log(c*(e*x^2+d)^p),x, algorithm="giac")

[Out]

-1/4*d^2*g*p*e^(-2)*log(x^2*e + d) + 2*sqrt(d)*f*p*arctan(x*e^(1/2)/sqrt(d))*e^(-1/2) + 1/8*(2*g*p*x^4*e*log(x
^2*e + d) - g*p*x^4*e + 2*g*x^4*e*log(c) + 2*d*g*p*x^2 + 8*f*p*x*e*log(x^2*e + d) - 16*f*p*x*e + 8*f*x*e*log(c
))*e^(-1)